//
//  WJSendMessageCollectionViewCell.m
//  RenRen
//
//  Created by 杜文杰 on 2018/7/19.
//

#import "WJSendMessageCollectionViewCell.h"
@interface WJSendMessageCollectionViewCell()

@end

@implementation WJSendMessageCollectionViewCell
- (void)setDataDic:(NSDictionary *)dataDic
{
    self.titleLabel.text = dataDic[@"catname"];
    
}
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setUpViews];
    }
    return self;
}

- (void)setUpViews
{
    [self addSubview:self.titleLabel];
    [self addSubview:self.detailTitleLabel];
    
    __weak typeof(self)weakself = self;
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(weakself.mas_top).offset(20 / HEIGHT_6S_SCALE);
        make.left.equalTo(weakself.mas_left).offset(30 / WIDTH_6S_SCALE);
        make.height.mas_equalTo(20 / HEIGHT_6S_SCALE);
        make.width.mas_equalTo(weakself);
    }];
    [self.detailTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(weakself.titleLabel.mas_bottom).offset(10 / HEIGHT_6S_SCALE);
        make.left.equalTo(weakself.titleLabel);
        make.height.mas_equalTo(20 / HEIGHT_6S_SCALE);
        make.width.mas_equalTo(weakself);
    }];
}
#pragma mark - init
- (UILabel *)titleLabel
{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.backgroundColor = [UIColor clearColor];
        _titleLabel.font = DEF_FontSize_14;
        _titleLabel.textColor = getColor(blackColor);
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.text = @"10";
    }
    return _titleLabel;
}
- (UILabel *)detailTitleLabel
{
    if (!_detailTitleLabel) {
        _detailTitleLabel = [[UILabel alloc]init];
        _detailTitleLabel.backgroundColor = [UIColor clearColor];
        _detailTitleLabel.font = DEF_FontSize_14;
        _detailTitleLabel.textColor = getColor(blackColor);
        _detailTitleLabel.textAlignment = NSTextAlignmentLeft;
        _detailTitleLabel.text = @"服务评分";
    }
    return _detailTitleLabel;
}
@end

